汽车信息推送系统<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>汽车信息推送系统</title>

    <script src="__STATIC__/jquery-2.js"></script>
    <script src="__STATIC__/layui/layui.js"></script>
    <link rel="stylesheet" href="__STATIC__/layui/css/layui.css">
</head>
<body class="layui-layout-body">
<div class="layui-layout layui-layout-admin">

    {include file="public/header" /}
    {include file="public/left" /}
    <style>
        .layui-table-cell{
            height: 33px;
        }
    </style>



    <div class="layui-body">
        <!-- 内容主体区域 -->
        <div style="padding: 15px;">
            <fieldset class="layui-elem-field layui-field-title"  style="margin-top: 50px;">
                <legend>评论编辑</legend>
            </fieldset>
            <form class="layui-form layui-form-pane" action="{:url('comment/modify')}">
            <div class="layui-form-item">
                <label class="layui-form-label">评论id</label>
                <div class="layui-input-inline">
                    <input type="text" value="{$comment.ll_cmtid}" name="ll_cmtid" disabled  class="layui-input">
                    <input type="hidden" value="{$comment.ll_cmtid}" name="ll_cmtid"   class="layui-input">
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">评论用户</label>
                <div class="layui-input-inline">
                    <input type="text" value="{$comment.ll_username}" name="ll_catname" disabled  lay-verify="required"  autocomplete="off" class="layui-input">
                </div>
            </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">评论用户id</label>
                    <div class="layui-input-inline">
                        <input type="text" value="{$comment.ll_uid}" name="ll_uid" disabled  lay-verify="required"  autocomplete="off" class="layui-input">
                    </div>
                </div>


                <div class="layui-form-item">
                    <label class="layui-form-label">文章名称</label>
                    <div class="layui-input-inline">
                        <input type="text" value="{$comment.ll_title}" name="ll_title" disabled  lay-verify="required"  autocomplete="off" class="layui-input">
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">文章id</label>
                    <div class="layui-input-inline">
                        <input type="text" value="{$comment.ll_aid}" name="ll_aid" disabled  lay-verify="required"  autocomplete="off" class="layui-input">
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">文章id</label>
                    <div class="layui-input-inline">
                        <input type="text" value="{$comment.ll_aid}" name="ll_aid" disabled  lay-verify="required"  autocomplete="off" class="layui-input">
                    </div>
                </div>

                <div class="layui-form-item layui-form-text">
                    <label class="layui-form-label">评论</label>
                    <div class="layui-input-block">
                        <textarea placeholder="评论" class="layui-textarea" name="ll_comments">{$comment.ll_comments}</textarea>
                    </div>
                </div>

                <div class="layui-form-item">
                    <button class="layui-btn" lay-submit="" lay-filter="demo2">提交</button>
                </div>

            </form>

        </div>
    </div>


</div>

<script>

    //JavaScript代码区域
    layui.use('element', function(){
        var element = layui.element;

    });
    $('#logout').click(function (e) {
        e.preventDefault();
        layui.use('layer', function(){
            var layer = layui.layer;

            layer.confirm('你真的要退出吗？',['yes','no'],function () {
                location.href="{:url('login/logout')}";
            },function () {
                
            })
        });
    })



    layui.use(['form', 'layedit', 'laydate'], function(){
        var form = layui.form
                ,layer = layui.layer
                ,layedit = layui.layedit
                ,laydate = layui.laydate;

        //日期
        laydate.render({
            elem: '#date'
        });
        laydate.render({
            elem: '#date1'
        });

        //创建一个编辑器
        var editIndex = layedit.build('LAY_demo_editor');

        //自定义验证规则
        form.verify({
            title: function(value){
                if(value.length < 5){
                    return '标题至少得5个字符啊';
                }
            }
            ,pass: [/(.+){6,12}$/, '密码必须6到12位']
            ,content: function(value){
                layedit.sync(editIndex);
            }
        });

        //监听指定开关
        form.on('switch(switchTest)', function(data){
            layer.msg('开关checked：'+ (this.checked ? 'true' : 'false'), {
                offset: '6px'
            });
            layer.tips('温馨提示：请注意开关状态的文字可以随意定义，而不仅仅是ON|OFF', data.othis)
        });

        //监听提交
        form.on('submit(demo1)', function(data){
            layer.alert(JSON.stringify(data.field), {
                title: '最终的提交信息'
            })
            return false;
        });


    });


</script>

</body>
</html>